package com.yc.bbs.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.plugins.pagination.PageDto;
import com.yc.bbs.dao.ReplyMapper;
import com.yc.bbs.entity.Reply;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * BBS论坛-回帖表-2 前端控制器
 * </p>
 *
 * @author ly
 * @since 2024-11-23
 */
@RestController
@RequestMapping("/reply")
public class ReplyController {

    @Autowired
    ReplyMapper replyMapper;

    @RequestMapping("queryByTid")
    public Page<Reply> queryByTid(int tid, int page, int rows){
        Page<Reply> p = new PageDto<>(page, rows);
        return replyMapper.selectByTid(tid, p);
    }
}
